package com.itheima.controller;


import com.itheima.entity.Result;
import com.itheima.pojo.Permission;
import com.itheima.service.PermissionService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/permission")
public class PermissionController {
    @Reference
    private PermissionService permissionService;
    @RequestMapping("/findAllPermission")
    public Result findAllPermission(){
         List<Permission> list=permissionService.findAllPermission();
        return  new Result(true,"查询所有的权限成功",list);
    }
}
